package com.newdream.feigndemo.fallback;

import com.newdream.feigndemo.model.User;
import com.newdream.feigndemo.service.FeignService;
import org.springframework.stereotype.Component;

/**
 * @ author: sanglei
 * @ date: 2019-05-14 17:50
 * @ description: 定义fallback 信息 定义降级信息
 */
@Component
public class FeignFallBack implements FeignService {
    @Override
    public User getUser(Integer id) {
        User user = new User();
        user.setAge(0);
        user.setDescr("降级了");
        return user;
    }
}
